package com.secret.chain.secretchain.mapper;

import com.secret.chain.secretchain.domain.entity.Collect;
import com.secret.chain.secretchain.domain.entity.Comment;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface CommentMapper {
    @Select("select * from comment where article_id = #{articleId}")
    Comment queryByArticleId(Integer id);

    @Select("select * from comment where user_id = #{userId}")
    Comment queryByUserId(Integer id);


    void insert(Comment comment);

    @Delete("delete from comment where id = #{id}")
    void delete(Integer id);

    void update(Comment comment);
}
